Global Replace in a multi-language environment

The EMu Global Replace facility is used to perform changes over a number of records. It provides a mechanism for applying the same update to a selected set of records. The Global Replace facility works by applying a user supplied string or pattern against a particular field, and where matches occur the matching text is replaced with another user supplied value. The important point here is that the string or pattern entered by the user to match against is compared to the data for a given field as it is stored on the server, that is as it is specified in the Supported Registry entry: any string or pattern supplied for replacement must therefore be in this same order. In order to enforce this restriction, the following functionality applies to the Global Replace facility:

  • The Global Replace facility is disabled unless All Languages is selected for the language Data setting: that is, the Replace command cannot be invoked when viewing data in a single language.

    The reason for the restriction is that any string or pattern used to find text to replace is searched for in the complete field value, not just the current Data language. For example, to replace the word total with aggregate in an English / French EMu system, the Global Replace facility will locate all instances of total and replace them with aggregate regardless of where in the data the text appears. Hence, where total appears in the French text, it is replaced with the English word aggregate. This means that a user could change values in a language other than the one they are viewing currently. In order to avoid this issue, the Global Replace facility is not available when viewing a single language.

  • The Global Replace facility is disabled when All Languages is selected for the Data language setting and where the Display Order language setting is not the same order as that defined by the Supported Registry entry (which is displayed in the System Order field on the Language tab of the Options box).

    The reason for the restriction is that it may not be possible to translate strings or patterns entered with arbitrary display order settings to values suitable for replacing. For example, in an English / French system with a Display Order of French / English, the string / pattern total;:; cannot be converted to a single pattern for applying to the English / French data stored in EMu. The string / pattern means to look for the word total where it is the last French word (as it has a trailing language delimiter entered). One possible solution is to translate the string / pattern as French$ so that French is the last word in the data. However such a string / pattern would match the following data:

    • French
    • English;:;French

    In other words English data may be modified where only French changes were intended. There are a number of other patterns that are also problematic as they cannot be converted to a pattern suitable for use with English / French data. In order to avoid the accidental updating of values not intended to be updated, the Global Replace facility is only enabled for users who are viewing All Languages and the language Display Order is the same as that defined by the Supported Registry entry.